<?php class MEmail extends CI_Model {
	
	function __construct()
	    {
		parent::__construct();
	    }

	function getAllEmailNewsletter() {
		$data = array();
		$sql = "SELECT * FROM email where isNewsletter=1 ";
		$Q = $this->db->query($sql);
		if ($Q->num_rows()>0){
			foreach ($Q->result_array() as $row){
			$data[]=$row;
			}
		}
		$Q->free_result();
		return $data;
	}
	
	
}//end class
?>